<template>
  <div class="item-wrap-container" :class="{ 'skew-border': isSkew }">
    <div class="sec-title">
      <img src="../assets/images/sec-icon.png" alt="" v-if="title" />
      {{ title }}
    </div>
    <div class="sec-content">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: "ItemWrap",
  props: {
    isSkew: {
      type: Boolean,
      default: true,
    },
    title: { type: String, default: "" },
  },
};
</script>
<style lang="less">
.item-wrap-container {
  position: relative;
  padding: 10px 10px;
  height: 100%;
  //border: 1px solid #3099D1;
  border-radius: 6px;
  background: rgba(48, 153, 209, 0.2);
  box-sizing: border-box;
  &.skew-border {
    border-radius: 6px 40px 6px 6px;
  }
  .sec-title {
    height: 30px;
    line-height: 30px;
    margin: 0 auto 15px;
    box-sizing: border-box;
    font-size: 18px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      display: inline-block;
      width: 18px;
      height: 16px;
      margin-right: 10px;
    }
  }
  .sec-content {
    padding: 0 20px;
    height: calc(100% - 60px);
    box-sizing: border-box;
  }
}
</style>
